package com.ruoyi.system.service;

import java.util.List;
import com.ruoyi.system.domain.TBOrderDevice;

/**
 * 订单关联设备Service接口
 * 
 * @author pspyy
 * @date 2022-03-09
 */
public interface ITBOrderDeviceService 
{
    /**
     * 查询订单关联设备
     * 
     * @param id 订单关联设备主键
     * @return 订单关联设备
     */
    public TBOrderDevice selectTBOrderDeviceById(Long id);

    public TBOrderDevice selectTBOrderDeviceByCode(String code);

    /**
     * 查询订单关联设备列表
     * 
     * @param tBOrderDevice 订单关联设备
     * @return 订单关联设备集合
     */
    public List<TBOrderDevice> selectTBOrderDeviceList(TBOrderDevice tBOrderDevice);

    /**
     * 新增订单关联设备
     * 
     * @param tBOrderDevice 订单关联设备
     * @return 结果
     */
    public int insertTBOrderDevice(TBOrderDevice tBOrderDevice);

    /**
     * 修改订单关联设备
     * 
     * @param tBOrderDevice 订单关联设备
     * @return 结果
     */
    public int updateTBOrderDevice(TBOrderDevice tBOrderDevice);

    /**
     * 批量删除订单关联设备
     * 
     * @param ids 需要删除的订单关联设备主键集合
     * @return 结果
     */
    public int deleteTBOrderDeviceByIds(Long[] ids);

    /**
     * 删除订单关联设备信息
     * 
     * @param id 订单关联设备主键
     * @return 结果
     */
    public int deleteTBOrderDeviceById(Long id);

    /**
     * 根据订单号和设备id删除
     * @return 结果
     */
    public int deleteByNoAndDevId(String no,Long devId);

    public List<Long> selectDeviceIdList(String orderNum);

    public int deleteTBOrderDeviceByOrderNum(String orderNum);

    public int unLockDevice(Long[] ids);
    public int lockDevice(Long[] ids);

    public List<TBOrderDevice> selectByDeviceId(Long[] ids);

    public Long selectByOrderNum(String orderNum);
    //判断付款状态，是否为全款或分期全付清
    public List<String> validateStatus(String orderNum);
}
